#coding=utf-8
# gbk

#例7-19∶字典的创建、添加、删除和修改
dict = {'a': 'apple', 'b ': 'banana','g': 'grape', 'o': 'orange'}  # 创建字典
print (dict)
dict['w'] = 'watermelon'  # 添加字典元素
print (dict)
del (dict['a'])  # 删除字典中键为'a '的元表
print (dict)
dict['g'] = 'grapefruit'  # 修改字典中键为"g'的值
print (dict)
